package com.hessian.impl;

import com.caucho.hessian.server.HessianServlet;
import com.hessian.HelloHessian;
import com.hessian.domain.MyCar;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by buguniao on 15/12/10.
 */
public class HelloHessianImpl extends HessianServlet implements HelloHessian {
    public MyCar getMyCar() {
        MyCar car = new MyCar();
        car.setCarName("阿斯顿·马丁");
        car.setCarModel("One-77");
        return car;
    }

    public Map myBabays() {
        Map map = new HashMap();
        map.put("son", "孙吴空");
        map.put("daughter", "孙小美");
        return map;
    }

    public List myLoveFruit() {
        List list = new ArrayList();
        list.add("apple");
        list.add("kiwi");
        list.add("orange");
        return list;
    }

    public String sayHello() {
        return "welcom to Hessian";
    }

}
